[gd_scene load_steps=14 format=1]

[ext_resource path="res://scripts/grappling_hook.gd" type="Script" id=1]
[ext_resource path="res://scripts/shader/ship.tres" type="Shader" id=2]
[ext_resource path="res://images/ships/grappling_hook_n.png" type="Texture" id=3]
[ext_resource path="res://images/ships/grappling_hook_c.png" type="Texture" id=4]
[ext_resource path="res://images/ships/grappling_hook_wire_c.png" type="Texture" id=5]
[ext_resource path="res://images/particles/grey01.png" type="Texture" id=6]
[ext_resource path="res://scripts/shader/grappling_hook.tres" type="Shader" id=7]

[sub_resource type="CircleShape2D" id=1]

custom_solver_bias = 0.0
radius = 14.0

[sub_resource type="CanvasItemMaterial" id=2]

shader/shader = ExtResource( 2 )
shader/shading_mode = 0
shader_param/normal = ExtResource( 3 )

[sub_resource type="CanvasItemMaterial" id=4]

shader/shader = ExtResource( 7 )
shader/shading_mode = 0
shader_param/amplitude = 1.0

[sub_resource type="Gradient" id=5]

offsets = FloatArray( 0, 0.134503, 0.596491, 1 )
colors = ColorArray( 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0 )

[sub_resource type="Animation" id=7]

resource/name = "destroy"
length = 2.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:visibility/visible")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = { "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "update":1, "values":[ true, false ] }
tracks/1/type = "value"
tracks/1/path = NodePath("Wire:visibility/visible")
tracks/1/interp = 1
tracks/1/imported = false
tracks/1/keys = { "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "update":1, "values":[ true, false ] }
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/imported = false
tracks/2/keys = { "times":FloatArray( 2 ), "transitions":FloatArray( 1 ), "values":[ { "args":[  ], "method":"queue_free" } ] }

[sub_resource type="Animation" id=6]

length = 0.6
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("Wire:material/material:shader_param/amplitude")
tracks/0/interp = 1
tracks/0/imported = false
tracks/0/keys = { "times":FloatArray( 0, 0.1, 0.6 ), "transitions":FloatArray( 1, 1, 1 ), "update":0, "values":[ 1.0, 1.0, 0.0 ] }

[node name="GrapplingHook" type="Area2D"]

input/pickable = true
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 0.667, 0, -8 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 1 )

[node name="Sprite" type="Sprite" parent="."]

visibility/opacity = 0.0
material/material = SubResource( 2 )
transform/scale = Vector2( 0.5, 0.5 )
texture = ExtResource( 4 )

[node name="Wire" type="Sprite" parent="."]

visibility/light_mask = 0
material/material = SubResource( 4 )
transform/pos = Vector2( 0, 9 )
transform/scale = Vector2( 1, 0.5 )
texture = ExtResource( 5 )
centered = false
offset = Vector2( -16, 0 )
region = true
region_rect = Rect2( 0, 0, 32, 200 )

[node name="CollisionShape" type="CollisionShape2D" parent="."]

transform/pos = Vector2( 0, -8 )
transform/scale = Vector2( 1, 0.667 )
shape = SubResource( 1 )
trigger = false
_update_shape_index = 0

[node name="Particles" type="Particles2D" parent="."]

visibility/self_opacity = 0.25
transform/pos = Vector2( 0, -8 )
config/amount = 64
config/lifetime = 2.0
config/emit_timeout = 0.25
config/emitting = false
config/local_space = false
config/texture = ExtResource( 6 )
params/direction = 0.0
params/spread = 180.0
params/linear_velocity = 24.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 0.0
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 8.0
params/initial_angle = 0.0
params/initial_size = 0.25
params/final_size = 0.05
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
randomness/linear_velocity = 0.25
randomness/initial_size = 0.75
randomness/final_size = 0.5
color/color_ramp = SubResource( 5 )

[node name="Joint" type="PinJoint2D" parent="."]

node_a = NodePath("")
node_b = NodePath("")
bias/bias = 0.0
collision/exclude_nodes = false
softness = 1.0

[node name="Anim" type="AnimationPlayer" parent="."]

playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/destroy = SubResource( 7 )
anims/fade_in = SubResource( 6 )
playback/active = true
playback/speed = 1.0
blend_times = [  ]
autoplay = "fade_in"

[connection signal="body_enter" from="." to="." method="_collide"]


